#pragma once
#include <vector>

class IEntity;
class CEntityManager
{
public:
	CEntityManager ( void );
	~CEntityManager( void );
	
	void AddEntity( IEntity* pEntity, unsigned int unType );
	void RemoveEntity( IEntity* pEntity );
	void RemoveEntity( IEntity* pEntity, unsigned int unType );
	void RemoveAll( unsigned int unType );
	void RemoveAll( void );
	void UpdateAll( float fElapsedTime );
	void RenderAll( void );
	void CheckAllCollisions( unsigned int unType1, unsigned int unType2 );

private:
	typedef std::vector<IEntity*> EntityVector;
	typedef EntityVector::iterator EVIterator;
	typedef std::vector<EntityVector> EntityTable;

	EntityTable		m_tEntities;	 
	bool			m_bIterating;
};
